home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 4 / Eagles_Nest_Mac_Collection_Disc_4.TOAST / Desktop Publishing / PersPress201 / PP Pouch / AutoCreate / Brochures / Brochures < prev    next >
Text File  |  1992-05-29  |  19KB  |  826 lines

  1.  
  2. on AutoCreate
  3. Global FolderBase
  4. global TheCurrentDialog, theDialog
  5. global The_Style -- Current page style selections.
  6. global StyleKind
  7. global userMeasurements
  8.  
  9. set lockscreen to true
  10. set mouseCursor to busy
  11. set lockcursor to true
  12. put measurements into userMeasurements
  13.  
  14.  
  15.  
  16. put 501 into theCurrentDialog
  17.  
  18. put ":autocreate:brochures:" into FolderBase
  19. open util script FolderBase&"_Utility"
  20. locatefonts
  21. progressdialog open
  22.  
  23. repeat forever
  24.  
  25. do "put RunDialog" & TheCurrentDialog & "() into theResult"
  26.  
  27. switch theResult
  28. case "Next" 
  29. put theCurrentDialog +1 into theCurrentDialog
  30. exit switch
  31. case "Prev"
  32. case "Previous"
  33. put theCurrentDialog -1 into theCurrentDialog
  34. exit switch
  35. case "Done"
  36. Exit repeat
  37. exit switch
  38. case "Cancel"
  39. get dialog(dispose, theDialog)
  40. set  measurements to userMeasurements
  41. exit AutoCreate
  42. exit switch
  43. end switch
  44.  
  45. end repeat
  46.  
  47.  
  48. -- Build the Pages
  49. Set mousecursor to busy
  50.  
  51. -- Choose the Page Styles from the PICT ID's
  52. put the_Style into StyleKind
  53.  
  54. switch The_Style
  55. case "Modern4" -- Brochure Modern 4pg
  56. Set mousecursor to busy
  57. progressdialog show "Making Page Settings…"
  58. callscript "_setpagesettings4pg", "SetPageSettings"
  59. Set mousecursor to busy
  60. set currentpage to 1
  61. progressdialog show "Making Page 1…"
  62. callscript "_Brochure 4pg Modern.pg1", "build_Modern_4pg_pg_1"
  63. Set mousecursor to busy
  64. set currentpage to 2
  65. progressdialog show "Making Page 2…"
  66. callscript "_Brochure 4pg Modern.pg2", "build_Modern_4pg_pg_2"
  67. Set mousecursor to busy
  68. set currentpage to 3
  69. progressdialog show "Making Page 3…"
  70. callscript "_Brochure 4pg Modern.pg3", "build_Modern_4pg_pg_3"
  71. Set mousecursor to busy
  72. set currentpage to 4
  73. progressdialog show "Making Page 4…"
  74. callscript "_Brochure 4pg Modern.pg4" ,"build_Modern_4pg_pg_4"
  75. exit switch
  76. case "Modern6" -- Brouchure Modern 6pg
  77. progressdialog show "Making Page Settings…"
  78. callscript "_setpagesettings6pg", "SetPageSettings"
  79. Set mousecursor to roll
  80. set currentpage to 1
  81. progressdialog show "Making Pages 1 to 3…"
  82. callscript "_Brochure 6pg Modern.pg1", "build_Modern_6pg_pg_1"
  83. Set mousecursor to busy
  84. set currentpage to 2
  85. progressdialog show "Making Pages 4 to 6…"
  86. callscript "_Brochure 6pg Modern.pg2", "build_Modern_6pg_pg_2"
  87. Set mousecursor to busy
  88. exit switch
  89. case "Traditional6" -- Brochure Traditional 6pg
  90. progressdialog show "Making Page Settings…"
  91. callscript "_setpagesettings6pgT", "SetPageSettings"
  92. Set mousecursor to busy
  93. set currentpage to 1
  94. progressdialog show "Making Pages 1 to 3…"
  95. callscript "_Brochure 6pg Traditional.pg1", "build_Traditional_6pg_pg_1"
  96. Set mousecursor to busy
  97. set currentpage to 2
  98. progressdialog show "Making Pages 4 to 6…"
  99. callscript "_Brochure 6pg Traditional.pg2", "build_Traditional_6pg_pg_2"
  100. Set mousecursor to busy
  101. exit switch
  102. end switch
  103.  
  104. if theResult = "Done" then
  105. get dialog(dispose, theDialog)
  106. set lockCursor to true
  107. end if
  108. progressdialog close
  109. set saveglobals to true
  110. set  measurements to userMeasurements
  111.  
  112. end AutoCreate
  113.  
  114. on cleanup
  115. Global TheCurrentDialog
  116. global FolderBase
  117. global StyleKind
  118. global userMeasurements
  119. global vHelvetica, vTimes
  120.  
  121. set measurements to points
  122. put 502 into TheCurrentDialog
  123. set ShuffleTextObjects to false
  124.  
  125.  
  126. set lockscreen to true
  127. set lockcursor to true
  128. open util script FolderBase&"_Utility"
  129. progressdialog open
  130.  
  131. set currentpage to 1
  132. Select all text in story "Brochure Text"
  133. progressdialog show "Copyfitting…"
  134. set styleRecomposition to false
  135. if StyleKind contains "Modern" then
  136. set textfont to vHelvetica
  137. else
  138. set textfont to vTimes
  139. end if
  140. set styleRecomposition to true
  141. copyfit
  142.  
  143. progressdialog show "Copying Logos…"
  144. callscript "_copyLogos", "copyLogos"
  145. progressdialog hide
  146.  
  147. repeat forever
  148.  
  149. do "put RunDialog" & TheCurrentDialog & "() into theResult"
  150.  
  151. switch theResult
  152. case "Next" 
  153. put theCurrentDialog +1 into theCurrentDialog
  154. exit switch
  155. case "Prev"
  156. case "Previous"
  157.  
  158. put theCurrentDialog -1 into theCurrentDialog
  159. exit switch
  160. case "Done"
  161. Exit repeat
  162. exit switch
  163. case "Cancel"
  164. get dialog(dispose, theDialog)
  165. set  measurements to userMeasurements
  166. exit Cleanup
  167. exit switch
  168. end switch
  169.  
  170. end repeat
  171.  
  172. publicationsetup columns 1
  173. set view to sizetofit
  174. progressdialog close
  175.  
  176. if styleKind ≠ "Modern4" then
  177. answer "Please choose Landscape Orientation…" with "OK"
  178. domenu "Page Setup…"
  179. end if
  180.  
  181. if styleKind = "Modern4" then
  182. set currentpage to 4
  183. select all text in story "Address"
  184. copyfit
  185.  
  186. put false into killNote --init variable for use below
  187. select objects where name of this object = "Map"
  188. get SelectedObjects()
  189. if number of items in it > 0 then
  190. put the name of object (item 1 of it) into theMapObject
  191. if kind of object theMapObject ≠ "Rectangle" then
  192. put true into killNote
  193. end if
  194. select empty
  195. select objects where name of this object = "Title Map Area"
  196. get SelectedObjects()
  197. if number of items in it > 0 then
  198. set locked of object (item 1 of it) to false
  199. if killNote = true then
  200. clear
  201. end if
  202. end if
  203. end if
  204. end if
  205.  
  206. set  measurements to userMeasurements
  207.  
  208. repeat with i = 1 to number of pages -- unlock all objects in doc so user has control
  209. set currentpage to i
  210. select all objects
  211. set locked to false
  212. end repeat
  213. set currentpage to 1
  214. select empty
  215.  
  216. end cleanup
  217.  
  218.  
  219.  
  220. function RunDialog501
  221. -- Phase I, initial options.
  222. Global The_Style -- Scripted Pages to use.
  223. Global theDialog
  224.  
  225. put dialog(preload, 501) into theDialog
  226. set lockCursor to true
  227. set mousecursor to busy
  228.  
  229.  
  230. -- Set default options
  231. SetDialogItem 21,"Set" -- Modern 4 page
  232. SetDialogItem 22,"Clear" -- Modern 6 Panel
  233. SetDialogItem 23,"Clear" -- Traditional 6 Panel
  234.  
  235. -- Define action procs
  236. SetDialogItem 24, Box -- Style Box
  237. SetDialogItem 17, box  -- Page Navigator
  238. SetDialogITem 15, disabled
  239. setDialogitem 10,graybox -- Preview
  240.  
  241. put 1201 into minpage
  242. put 1204 into maxpage
  243. put 1201 into page_one
  244. put 1202 into page_two
  245. put "Modern4" into The_Style
  246.  
  247. SetDialogITem 3, invisible
  248. SetDialogITem 4, invisible
  249.  
  250. repeat forever
  251.  
  252. if The_Style = "Modern4" then
  253. SetDialogItem 11, Picture, PAGE_ONE, visible
  254. SetDialogItem 19, Picture, PAGE_TWO, visible
  255. SetDialogItem 20, invisible
  256. else
  257. SetDialogItem 11, invisible
  258. SetDialogItem 19, invisible
  259. SetDialogItem 20, Picture, PAGE_ONE, visible
  260. end if
  261.  
  262. Switch dialog(display, theDialog)
  263. set lockCursor to true
  264. set mousecursor to busy
  265. -- Done Button.
  266. case 1 
  267. put "Done" into theResult
  268. exit repeat
  269. exit switch
  270.  
  271. -- Cancel button
  272. case 2
  273. put "Cancel" into theResult
  274. exit repeat
  275. exit switch
  276.  
  277. -- Help
  278. case 5
  279. helpdialog 501, "Autocreate - Design Options"
  280. exit switch
  281.  
  282. case 21 -- Modern 4 page
  283. setDialogitem 10,graybox -- Preview
  284. put "Modern4" into The_Style
  285. put 1201 into minpage
  286. put 1204 into maxpage
  287. put 1201 into PAGE_ONE
  288. put 1202 into PAGE_TWO
  289. SetDialogItem 15, Disabled -- Prev Page
  290. SetDialogItem 16, Enabled -- Next Page
  291. exit switch
  292.  
  293. case 22 -- Modern 6 Panel
  294. setDialogitem 10,graybox -- Preview
  295. put "Modern6" into The_Style
  296. put 1101 into minpage
  297. put 1102 into maxpage
  298. put 1101 into PAGE_One
  299. put 1101 into PAGE_Two
  300. SetDialogItem 15, Disabled -- Prev Page
  301. SetDialogItem 16, Enabled -- Next Page
  302. exit switch
  303.  
  304. case 23 -- Traditional 6 Panel
  305. setDialogitem 10,graybox -- Preview
  306. put "Traditional6" into The_Style
  307. put 1001 into minpage
  308. put 1002 into maxpage
  309. put 1001 into PAGE_One
  310. put 1001 into PAGE_Two
  311. SetDialogItem 15, Disabled -- Prev Page
  312. SetDialogItem 16, Enabled -- Next Page
  313. exit switch
  314.  
  315. case 15 -- Prev page button
  316. SetDialogItem 16, "Enabled" -- Next Page
  317. subtract 1 from Page_One
  318. subtract 1 from Page_Two
  319.  
  320. if Page_One = minpage then
  321. SetDialogItem 15, "Disabled" -- Prev Page
  322. end if
  323. exit switch
  324.  
  325. case 16 -- Next page button
  326. SetDialogItem 15, "Enabled" -- Prev Page
  327. add 1 to Page_One
  328. add 1 to Page_Two
  329.  
  330. if Page_Two = maxpage then
  331. SetDialogItem 16, "Disabled" -- Next Page
  332. end if
  333. exit switch
  334.  
  335. end switch
  336.  
  337. end repeat
  338.  
  339. return theResult
  340. end RunDialog501
  341.  
  342. function RunDialog502
  343. -- Phase III, initial options.
  344. Global theDialog
  345. Global TheItems
  346. global TheAddressData
  347. global FolderBase
  348. Global theBusinessFolder
  349.  
  350. put ":autocreate:brochures:" into theBusinessFolder
  351. put dialog(preload, 502) into theDialog
  352. set lockCursor to true
  353. set mousecursor to busy
  354.  
  355. SetDialogItem 21, "Box" -- Box
  356.  
  357. -- Set default options
  358. SetDialogItem 9,"Set" -- Name
  359. SetDialogItem 11,"Set" -- Company Name
  360. SetDialogItem 13,"Set" -- Address 1
  361. SetDialogItem 15,"Clear" -- Address 2
  362. SetDialogItem 17,"Clear" -- Address 3
  363. SetDialogItem 19,"Set" -- City, State, Zip
  364.  
  365. SetDialogItem 10,"Set" -- Phone Number (+Extension)
  366. SetDialogItem 12,"Clear" -- Fax Number
  367. SetDialogItem 14,"Clear" -- Telex Number
  368. SetDialogItem 16,"Clear" -- Position at Company
  369. SetDialogItem 18,"Clear" -- Other 1
  370. SetDialogItem 20,"Clear" -- Other 2
  371.  
  372. put theBusinessFolder&"_The Default Address" into addressfile
  373. if not exists( file addressfile) then 
  374. SetDialogItem 23, "Disabled"
  375. put empty into TheAddressData
  376. set itemdel to numtochar(1)
  377. put x into item 13 of TheAddressData -- forces 13 items
  378. set itemdel to ","
  379. end if
  380. repeat forever
  381.  
  382. Switch dialog(display, theDialog)
  383. set lockCursor to true
  384. set mousecursor to busy
  385.  
  386. case 1  -- Next Button.
  387. put "Next" into theResult
  388. put 0 into itemcount
  389. set itemdel to numtochar(1) 
  390. if Hilited(item9) then 
  391. get item 1 of TheAddressData
  392. if it ≠ empty then put it into item 1 of TheAddressData
  393. else put "Enter Your Name Here" into item 1 of TheAddressData
  394. add 1 to itemcount
  395. else put empty into item 1 of TheAddressData
  396. if Hilited(item11) then 
  397. get item 2 of TheAddressData
  398. if it ≠ empty then put it into item 2 of TheAddressData
  399. else put "Enter Your Company Here" into item 2 of TheAddressData
  400. add 1 to itemcount
  401. else put empty into item 2 of TheAddressData
  402. if Hilited(item13) then
  403. get item 3 of TheAddressData
  404. if it ≠ empty then put it into item 3 of TheAddressData
  405. else put "123 Your Street" into item 3 of TheAddressData
  406. add 1 to itemcount
  407. else put empty into item 3 of TheAddressData
  408. if Hilited(item15) then
  409. get item 4 of TheAddressData
  410. if it ≠ empty then put it into item 4 of TheAddressData
  411. else put "Apartment or Suite" into item 4 of TheAddressData
  412. add 1 to itemcount
  413. else put empty into item 4 of TheAddressData
  414. if Hilited(item17) then
  415. get item 5 of TheAddressData
  416. if it ≠ empty then put it into item 5 of TheAddressData
  417. else put "Mail Stop" into item 5 of TheAddressData
  418. add 1 to itemcount
  419. else put empty into item 5 of TheAddressData
  420. if Hilited(item19) then
  421. get item 6 of TheAddressData
  422. if it ≠ empty then put it into item 6 of TheAddressData
  423. else put "City, State, Zip" into item 6 of TheAddressData
  424. add 1 to itemcount
  425. else put empty into item 6 of TheAddressData
  426. if Hilited(item10) then
  427. get item 7 of TheAddressData
  428. if it ≠ empty then put it into item 7 of TheAddressData
  429. else put "(123) 456-7890" into item 7 of TheAddressData
  430. add 1 to itemcount
  431. else put empty into item 7 of TheAddressData
  432. if Hilited(item12) then
  433. get item 8 of TheAddressData
  434. if it ≠ empty then put it into item 8 of TheAddressData
  435. else put "(123) 456-7890" into item 8 of TheAddressData
  436. add 1 to itemcount
  437. else put empty into item 8 of TheAddressData
  438. if Hilited(item14) then
  439. get item 9 of TheAddressData
  440. if it ≠ empty then put it into item 9 of TheAddressData
  441. else put "456-789" into item 9 of TheAddressData
  442. add 1 to itemcount
  443. else put empty into item 9 of TheAddressData
  444. if Hilited(item16) then
  445. get item 10 of TheAddressData
  446. if it ≠ empty then put it into item 10 of TheAddressData
  447. else put "Enter Your Position Here" into item 10 of TheAddressData
  448. add 1 to itemcount
  449. else put empty into item 10 of TheAddressData
  450. if Hilited(item18) then
  451. get item 11 of TheAddressData
  452. if it ≠ empty then put it into item 11 of TheAddressData
  453. else put "Enter Other data here" into item 11 of TheAddressData
  454. add 1 to itemcount
  455. else put empty into item 11 of TheAddressData
  456. if Hilited(item20) then
  457. get item 12 of TheAddressData
  458. if it ≠ empty then put it into item 12 of TheAddressData
  459. else put "Enter Other data here" into item 12 of TheAddressData
  460. add 1 to itemcount
  461. else put empty into item 12 of TheAddressData
  462. set itemdel to ","    
  463.  
  464. if itemcount > 8 then
  465. answer "You have selected too many items."
  466. get dialog(view, theDialog)
  467. else exit repeat
  468.  
  469. exit switch
  470.  
  471. case 2 -- Defaults button
  472. SetDialogItem 9,"Set" -- Name
  473. SetDialogItem 11,"Set" -- Company Name
  474. SetDialogItem 13,"Set" -- Address 1
  475. SetDialogItem 15,"Clear" -- Address 2
  476. SetDialogItem 17,"Clear" -- Address 3
  477. SetDialogItem 19,"Set" -- City, State, Zip
  478.  
  479. SetDialogItem 10,"Set" -- Phone Number (+Extension)
  480. SetDialogItem 12,"Clear" -- Fax Number
  481. SetDialogItem 14,"Clear" -- Telex Number
  482. SetDialogItem 16,"Clear" -- Position at Company
  483. SetDialogItem 18,"Clear" -- Other 1
  484. SetDialogItem 20,"Clear" -- Other 2
  485. put empty into theAddressData
  486. exit switch
  487.  
  488. -- Help
  489. case 3
  490. helpdialog 502, "Autocreate - Field Options"
  491. exit switch
  492.  
  493. case 23 -- Use Saved 
  494. open file addressfile
  495. read from file addressfile for 2000
  496. put it into TheAddressData
  497. close file addressfile
  498. put "Next" into theResult
  499. exit repeat
  500. exit switch
  501. end switch
  502.  
  503. end repeat
  504.  
  505. get dialog(dispose, theDialog)
  506. set lockCursor to true
  507.  
  508. return theResult
  509. end RunDialog502
  510.  
  511.  
  512. function RunDialog503
  513. -- Phase III, Address Text Entry.
  514. Global theDialog
  515. Global TheItems
  516. global TheAddressData
  517. Global TheBusinessFolder
  518. global FolderBase
  519. Global StyleKind
  520.  
  521. -- Force to go to "address" story page.
  522. select all text in story "address"
  523. clear
  524. choose maintool
  525.  
  526. set displayGuides to false
  527.  
  528. put false into DoUpdate
  529. put "unknown" into TheResult
  530.  
  531. put dialog(preload, 503) into theDialog
  532. set lockCursor to true
  533. set mousecursor to busy
  534.  
  535. SetDialogItem 26, "Box" -- Box
  536. SetDialogItem 7, graybox
  537. SetDialogItem 9, "Proxy", "contents", "1,p" -- Preview
  538.  
  539. -- Set Users options
  540. SetDialogItem 11, "set"
  541.  
  542. repeat with x = 0 to 7
  543. SetDialogItem 10 + x*2, Invisible
  544. SetDialogItem 11 + x*2, Invisible
  545. end repeat
  546.  
  547. set itemdel to numtochar(1)
  548. put 0 into position
  549.  
  550. repeat with x = 1 to 12
  551. get item x of theAddressData
  552. if it  ≠ empty then
  553. SetDialogItem 11 + position*2 ,"Contents", it
  554. SetDialogItem 11 + position*2 ,"visible"
  555. switch x
  556. case 1
  557. put "Name" into title
  558. exit switch
  559. case 2
  560. put "Company Name" into title
  561. exit switch
  562. case 3
  563. put "Address 1" into title
  564. exit switch
  565. case 4
  566. put "Address 2" into title
  567. exit switch
  568. case 5
  569. put "Address 3" into title
  570. exit switch
  571. case 6
  572. put "City&State" into title
  573. exit switch
  574. case 7
  575. put "Phone" into title
  576. exit switch
  577. case 8
  578. put "Fax" into title
  579. exit switch
  580. case 9
  581. put "Telex" into title 
  582. exit switch
  583. case 10
  584. put "Position" into title
  585. exit switch
  586. case 11
  587. put "Other 1" into title
  588. exit switch
  589. case 12
  590. put "Other 2" into title 
  591. exit switch
  592. end switch
  593. SetDialogItem 10 + position*2, "Contents", title
  594. SetDialogItem 10 + position*2 ,"visible"
  595. add 1 to position
  596. end if
  597. end repeat
  598.  
  599. set itemdel to ","
  600.  
  601.  
  602. SetDialogItem 1, contents, "Next"
  603.  
  604. put empty into theResult
  605. repeat until theResult = "Next" or theResult = "Prev"
  606.  
  607. put dialog(display, theDialog) into itemhit
  608. set lockCursor to true
  609. set mousecursor to busy
  610. Switch itemhit
  611.  
  612. case 1  -- Next Button.
  613. put "Next" into theResult
  614. put True into DoUpdate
  615. exit switch
  616.  
  617. case 2 -- Update button
  618. put true into DoUpdate
  619. exit switch
  620.  
  621. -- Help
  622. case 3
  623. helpdialog 503, "Autocreate - Data Options"
  624. exit switch
  625.  
  626. case 29 -- Previous Button
  627. put "Prev" into TheResult
  628. exit switch
  629.  
  630. case 28 -- Save current address
  631.  
  632. set itemdel to numtochar(1)
  633. put 0 into position
  634. repeat with x = 1 to 12 -- get new data
  635. if item x of theAddressData ≠ empty then
  636. put contentsof(value("item"& position*2 + 11)) into item x of theAddressData
  637. add 1 to position
  638. end if
  639. end repeat
  640. set itemdel to ","
  641.  
  642. if diskspace() > 500 then
  643. put theBusinessFolder&"_The Default Address" into addressfile
  644. open file addressfile 
  645. write theAddressData to file addressfile
  646. close file addressfile
  647. else
  648. answer "Not enough disk space to save address." with "Sorry!"
  649. end if
  650.  
  651. exit switch
  652.  
  653. end switch
  654.  
  655. if DoUpdate then
  656. set itemdel to numtochar(1)
  657. put 0 into position
  658. repeat with x = 1 to 12 -- get new data
  659. if item x of theAddressData ≠ empty then
  660. put contentsof(value("item"& position*2 + 11)) into item x of theAddressData
  661. add 1 to position
  662. end if
  663. end repeat
  664. set itemdel to ","
  665. select all text in story "address"
  666. clear
  667. put empty into TheText
  668.  
  669. switch stylekind
  670. case "Modern6"
  671. case "Modern4"
  672. open script FolderBase&"_SetModernStyle"
  673. SetModernStyle
  674. close script  FolderBase&"_SetModernStyle"
  675. exit switch
  676.  
  677. case "traditional6"
  678. open script FolderBase&"_SetCorporateStyle"
  679. SetCorporateStyle
  680. close script FolderBase&"_SetCorporateStyle" 
  681. exit switch
  682. end switch
  683.  
  684. choose maintool
  685. SetDialogItem 9, "Proxy", "contents", "1,p" -- Preview
  686. put false into DoUpdate      
  687. end if
  688.  
  689. end repeat
  690.  
  691. return theResult
  692. end RunDialog503
  693.  
  694.  
  695. function RunDialog504
  696. -- Phase III, Enter Fields
  697. Global theDialog
  698. Global TheItems
  699. Global TheAddressData
  700. Global vHelvetica, vTimes
  701. Global StyleKind
  702.  
  703. put dialog(preload, 504) into theDialog
  704. set lockCursor to true
  705. set mousecursor to busy
  706.  
  707. -- No Selling Points on Traditional6
  708. if StyleKind = "Traditional6" then
  709. setDialogItem 12, Invisible
  710. SetDialogItem 13, Invisible
  711. end if
  712.  
  713. -- Set Divider box
  714. SetDialogItem 14, box
  715.  
  716. -- Instructions
  717. SetDialogItem 5, "Text", "Please edit the text options for your brochure."
  718.  
  719. repeat forever
  720.  
  721. Switch dialog(display, theDialog)
  722. set lockCursor to true
  723. set mousecursor to busy
  724. -- Done Button.
  725. case 15
  726. put "Next" into theResult
  727. exit repeat
  728. exit switch
  729.  
  730. -- Help
  731. case 2
  732. helpdialog 504, "Autocreate - Design Options"
  733. exit switch
  734.  
  735. case 44 
  736. put "Prev" into theResult
  737. exit repeat
  738. exit switch  
  739.  
  740. end switch
  741.  
  742. end repeat
  743.  
  744. if exists( story "Brochure Title" ) then
  745. put contentsOf(item7) into story "Brochure Title"
  746. select all text in story "Brochure Title"
  747. set textfont to vHelvetica
  748. set textFace to plain
  749. set textFace to italic
  750. set flexibleLeading to false 
  751. set flexibleParaSpace to false
  752. copyfit
  753. end if
  754.  
  755. progressdialog show "Scanning For Taglines…"
  756. -- Find the TagLines
  757. repeat with x = 1 to number of pages
  758. Set Currentpage to x
  759. select empty
  760. select objects where name of this object contains "Tag Line"
  761. put SelectedObjects() into TheObjects
  762. if TheObjects ≠ empty then
  763. repeat with o = 1 to number of items in TheObjects
  764. put item 1 of storyloc of object (item o of theObjects) into TheStory
  765. put contentsOf(item9) into story theStory -- Make sure to find all tag lines.
  766. select all text in story theStory
  767. set textFace to plain
  768. if StyleKind contains "Modern" then
  769. set textfont to vHelvetica
  770. set textFace to bold,italic
  771. else
  772. set textFace to bold
  773. set textfont to vTimes
  774. end if
  775. set flexibleLeading to false 
  776. set flexibleParaSpace to false
  777. copyfit
  778. end repeat
  779. end if
  780. end repeat
  781.  
  782. if exists( story "Selling Points") then
  783. put contentsOf(item13) into story "Selling Points"
  784. select all text in story "Selling Points"
  785. set textfont to vHelvetica
  786. set textFace to plain
  787. set textFace to italic
  788. set flexibleLeading to false 
  789. set flexibleParaSpace to false
  790. copyfit
  791. end if
  792.  
  793. return theResult
  794. end RunDialog504
  795.  
  796. function RunDialog505
  797. Global TheScriptFolder
  798. progressdialog show "Scanning For Pullquotes…"
  799. callscript "_MakePullQuotesGeneral", "MakePullQuotes"
  800. progressdialog hide
  801.  
  802. return "next"
  803. end RunDialog505
  804.  
  805. function RunDialog506
  806. Global TheScriptFolder
  807. progressdialog show "Scanning For Captions…"
  808. callscript "_MakeCaptionsGeneral", "MakeCaptions"
  809. progressdialog hide
  810.  
  811. return "done"
  812. end RunDialog506
  813.  
  814. on autocreatehelp
  815. helpdialog 500, "Autocreate - Template Options"
  816. set saveglobals to true
  817. end autocreatehelp
  818.  
  819.  
  820. on callscript file, message
  821. global FolderBase
  822. open script FolderBase&file
  823. do message
  824. close script FolderBase&file
  825. end callscript
  826.     V≠<BÏ